package com.springboot.wisdom.mqtt.gateway;

import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

@Component
@MessagingGateway(defaultRequestChannel = "messageOutboundChannel")
public interface MqttGateway {

    void sendMsgMqtt(@Header(value = MqttHeaders.TOPIC) String topic, String payload);

    void sendMsgMqtt(@Header(value = MqttHeaders.TOPIC) String topic, @Header(value = MqttHeaders.QOS) int qos, String payload);
}
